package com.opencee.common.exception;

import com.opencee.common.constants.ResultCode;

/**
 * 基础错误异常
 *
 * @author admin
 */
public class BaseErrorException extends RuntimeException {

    private static final long serialVersionUID = 3655050728585279326L;

    private int code = ResultCode.INTERNAL_SERVER_ERROR.getCode();

    public BaseErrorException() {

    }

    public BaseErrorException(String msg) {
        super(msg);
    }

    public BaseErrorException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public BaseErrorException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
